﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TraceThisItem.Domain;

namespace TraceThisItem.WebUI.Teams
{
	public partial class Create : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{

		}

		protected void TeamsDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
		{
			if (e.Exception == null)
			{
				Response.Redirect("~/Teams");
			}
		}

		protected void ObjectDataSource_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
		{
			e.ObjectInstance = Facade.Instance;
		}

		protected void TeamsDetailsView_ItemCommand(object sender, DetailsViewCommandEventArgs e)
		{
			if (e.CommandName == "Cancel")
			{
				Response.Redirect("~/Teams");
			}
		}
	}
}